Integrand size = 21, antiderivative size = 169 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=a^3 x+\frac {19 a^3 \text {arctanh}(\sin (c+d x))}{16 d}-\frac {a^3 \tan (c+d x)}{d}-\frac {17 a^3 \sec (c+d x) \tan (c+d x)}{16 d}-\frac {a^3 \sec ^3(c+d x) \tan (c+d x)}{8 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{6 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d} \]
[Out]
Time = 0.28 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3971, 3554, 8, 2691, 3855, 2687, 30, 3853} \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {19 a^3 \text {arctanh}(\sin (c+d x))}{16 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}-\frac {a^3 \tan (c+d x)}{d}+\frac {a^3 \tan ^3(c+d x) \sec ^3(c+d x)}{6 d}-\frac {a^3 \tan (c+d x) \sec ^3(c+d x)}{8 d}+\frac {3 a^3 \tan ^3(c+d x) \sec (c+d x)}{4 d}-\frac {17 a^3 \tan (c+d x) \sec (c+d x)}{16 d}+a^3 x \]
[In]
[Out]
Rule 8
Rule 30
Rule 2687
Rule 2691
Rule 3554
Rule 3853
Rule 3855
Rule 3971
Rubi steps \begin{align*} \text {integral}& = \int \left (a^3 \tan ^4(c+d x)+3 a^3 \sec (c+d x) \tan ^4(c+d x)+3 a^3 \sec ^2(c+d x) \tan ^4(c+d x)+a^3 \sec ^3(c+d x) \tan ^4(c+d x)\right ) \, dx \\ & = a^3 \int \tan ^4(c+d x) \, dx+a^3 \int \sec ^3(c+d x) \tan ^4(c+d x) \, dx+\left (3 a^3\right ) \int \sec (c+d x) \tan ^4(c+d x) \, dx+\left (3 a^3\right ) \int \sec ^2(c+d x) \tan ^4(c+d x) \, dx \\ & = \frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{6 d}-\frac {1}{2} a^3 \int \sec ^3(c+d x) \tan ^2(c+d x) \, dx-a^3 \int \tan ^2(c+d x) \, dx-\frac {1}{4} \left (9 a^3\right ) \int \sec (c+d x) \tan ^2(c+d x) \, dx+\frac {\left (3 a^3\right ) \text {Subst}\left (\int x^4 \, dx,x,\tan (c+d x)\right )}{d} \\ & = -\frac {a^3 \tan (c+d x)}{d}-\frac {9 a^3 \sec (c+d x) \tan (c+d x)}{8 d}-\frac {a^3 \sec ^3(c+d x) \tan (c+d x)}{8 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{6 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d}+\frac {1}{8} a^3 \int \sec ^3(c+d x) \, dx+a^3 \int 1 \, dx+\frac {1}{8} \left (9 a^3\right ) \int \sec (c+d x) \, dx \\ & = a^3 x+\frac {9 a^3 \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a^3 \tan (c+d x)}{d}-\frac {17 a^3 \sec (c+d x) \tan (c+d x)}{16 d}-\frac {a^3 \sec ^3(c+d x) \tan (c+d x)}{8 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{6 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d}+\frac {1}{16} a^3 \int \sec (c+d x) \, dx \\ & = a^3 x+\frac {19 a^3 \text {arctanh}(\sin (c+d x))}{16 d}-\frac {a^3 \tan (c+d x)}{d}-\frac {17 a^3 \sec (c+d x) \tan (c+d x)}{16 d}-\frac {a^3 \sec ^3(c+d x) \tan (c+d x)}{8 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{6 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d} \\ \end{align*}
Time = 0.46 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.18 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {a^3 \arctan (\tan (c+d x))}{d}+\frac {19 a^3 \text {arctanh}(\sin (c+d x))}{16 d}-\frac {a^3 \tan (c+d x)}{d}+\frac {19 a^3 \sec (c+d x) \tan (c+d x)}{16 d}-\frac {53 a^3 \sec ^3(c+d x) \tan (c+d x)}{24 d}-\frac {a^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 2.26 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.15
method | result | size |
risch | \(a^{3} x +\frac {i a^{3} \left (435 \,{\mathrm e}^{11 i \left (d x +c \right )}+240 \,{\mathrm e}^{10 i \left (d x +c \right )}+865 \,{\mathrm e}^{9 i \left (d x +c \right )}-1200 \,{\mathrm e}^{8 i \left (d x +c \right )}-210 \,{\mathrm e}^{7 i \left (d x +c \right )}-1760 \,{\mathrm e}^{6 i \left (d x +c \right )}+210 \,{\mathrm e}^{5 i \left (d x +c \right )}-1440 \,{\mathrm e}^{4 i \left (d x +c \right )}-865 \,{\mathrm e}^{3 i \left (d x +c \right )}-1296 \,{\mathrm e}^{2 i \left (d x +c \right )}-435 \,{\mathrm e}^{i \left (d x +c \right )}-176\right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}+\frac {19 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 d}-\frac {19 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 d}\) | \(194\) |
derivativedivides | \(\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{5}}{24 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{48 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{48}-\frac {\sin \left (d x +c \right )}{16}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+\frac {3 a^{3} \sin \left (d x +c \right )^{5}}{5 \cos \left (d x +c \right )^{5}}+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )}{d}\) | \(223\) |
default | \(\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{5}}{24 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{48 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{48}-\frac {\sin \left (d x +c \right )}{16}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+\frac {3 a^{3} \sin \left (d x +c \right )^{5}}{5 \cos \left (d x +c \right )^{5}}+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )}{d}\) | \(223\) |
parts | \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{5}}{24 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{48 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{48}-\frac {\sin \left (d x +c \right )}{16}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}+\frac {3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}+\frac {3 a^{3} \tan \left (d x +c \right )^{5}}{5 d}\) | \(226\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.90 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {480 \, a^{3} d x \cos \left (d x + c\right )^{6} + 285 \, a^{3} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 285 \, a^{3} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (176 \, a^{3} \cos \left (d x + c\right )^{5} + 435 \, a^{3} \cos \left (d x + c\right )^{4} + 208 \, a^{3} \cos \left (d x + c\right )^{3} - 110 \, a^{3} \cos \left (d x + c\right )^{2} - 144 \, a^{3} \cos \left (d x + c\right ) - 40 \, a^{3}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \]
[In]
[Out]
\[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=a^{3} \left (\int 3 \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \tan ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \tan ^{4}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \tan ^{4}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.24 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {288 \, a^{3} \tan \left (d x + c\right )^{5} + 160 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{3} - 5 \, a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{5} + 8 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 90 \, a^{3} {\left (\frac {2 \, {\left (5 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{480 \, d} \]
[In]
[Out]
none
Time = 1.28 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.97 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {240 \, {\left (d x + c\right )} a^{3} + 285 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 285 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (45 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 95 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 366 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 1746 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3135 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 525 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \]
[In]
[Out]
Time = 14.83 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.20 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=a^3\,x+\frac {19\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}+\frac {-\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}+\frac {19\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}+\frac {61\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{20}-\frac {291\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}+\frac {209\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{8}-\frac {35\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
[In]
[Out]